function y = e_powell(x)
% Extended Powell Function
%x0=[3, -1, 0, 1, ......].  
%fmin=n/2
%Author:shi yangyang
%n=200;
n=length(x);
m=n/4;
y=ones(1,4);
for i=1:1:m
    t1=x(4*i-3)+10.0*x(4*i-2);
    t2=x(4*i-1)-x(4*i);
    t3=x(4*i-2)-2.0*x(4*i-1);
    t4=x(4*i-3)-x(4*i);
    y(i)=t1*t1+5.0*t2*t2+t3^4+10.0*t4^4;
end
y=sum(y);